docs: add guidance for apps with persistent connections (SSE/WebSocket)#739
Open
mecampbellsoup wants to merge 1 commit intovercel-labs:mainfrom
Open
docs: add guidance for apps with persistent connections (SSE/WebSocket)#739mecampbellsoup wants to merge 1 commit intovercel-labs:mainfrom
mecampbellsoup wants to merge 1 commit intovercel-labs:mainfrom
Conversation
`wait --load networkidle` always times out on apps with SSE, WebSocket, or long-polling connections because the network is never idle. This is a common stumbling block — the SKILL.md currently recommends networkidle in multiple places without noting this limitation. Adds a subsection under "Timeouts and Slow Pages" explaining the issue and recommending alternatives: domcontentloaded, element waits, text waits, and JS condition waits. Related to vercel-labs#479 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
|
@mecampbellsoup is attempting to deploy a commit to the Vercel Labs Team on Vercel. A member of the Team first needs to authorize it. |
ctate
requested changes
Mar 12, 2026
Collaborator
ctate
left a comment
There was a problem hiding this comment.
Nice catch — I hit the same timeout on a test SSE server and confirmed all four alternatives work. Two small asks: update the networkidle code comment to something like # Wait for zero network activity for 500ms (times out if page uses SSE/WebSocket), and add a "see below" note on the paragraph right above your new section so readers get the heads-up before copy-pasting networkidle. Otherwise this is good to go!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
skills/agent-browser/SKILL.mdwait --load networkidlealways times out on apps with SSE, WebSocket, or long-polling connectionsdomcontentloaded, element waits, text waits, JS condition waitsContext
We hit this while using agent-browser to QA a Django app that maintains an SSE connection on every authenticated page (for real-time chat updates).
wait --load networkidletimed out every time because Playwright's networkidle requires zero network activity for 500ms, which never happens with a persistent connection.The current SKILL.md recommends
networkidlein multiple code examples without noting this limitation. This affects any app using SSE, WebSockets, long-polling, or similar persistent connection patterns — which includes most real-time web apps (chat, dashboards, collaborative editors, notification systems).Related to #479 (changing
opendefault todomcontentloaded).Test plan
wait --load domcontentloadedworks as a replacementreferences/commands.md?🤖 Generated with Claude Code